Socket
Socket
Sign inDemoInstall

@changesets/pre

Package Overview
Dependencies
5
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@changesets/pre


Version published
Weekly downloads
575K
decreased by-14.31%
Maintainers
3
Created
Weekly downloads
 

Package description

What is @changesets/pre?

@changesets/pre is a tool designed to help manage pre-releases in a monorepo setup. It allows you to create, manage, and publish pre-releases of your packages, making it easier to test and iterate on changes before making a stable release.

What are @changesets/pre's main functionalities?

Enter Pre Mode

This command puts your repository into 'pre' mode, where all subsequent changesets will be treated as pre-releases. The 'beta' argument specifies the pre-release tag.

npx changeset pre enter beta

Exit Pre Mode

This command exits 'pre' mode, returning your repository to normal release behavior. Any subsequent changesets will be treated as stable releases.

npx changeset pre exit

Create a Changeset

This command creates a new changeset, which is a record of changes that will be included in the next release. In 'pre' mode, these changes will be part of the pre-release.

npx changeset add

Publish Pre-Release

This command publishes the pre-release packages to the npm registry. It ensures that the pre-release versions are correctly tagged and available for testing.

npx changeset publish

Other packages similar to @changesets/pre

Readme

Source

@changesets/pre

View changelog

Enter and exit pre mode in a Changesets repo.

Usage

import { enterPre, exitPre } from "@changesets/pre";

await enterPre(cwd, tag);

let preState = await readPreState(cwd);

// version packages with @changesets/cli or get a release plan and apply it
await exitPre(cwd);

This package is used by internally by Changesets to enter and exit pre mode along with reading the pre state for the publish and version commands, you should only need it if you're using @changesets/assemble-release-plan, implementing Changesets or want to enter or exit pre mode programmatically.

Types

import { PreState } from "@changesets/types";

export function enterPre(cwd: string, tag: string): Promise<void>;
export function exitPre(cwd: string): Promise<void>;
export function readPreState(cwd: string): Promise<PreState>;

FAQs

Last updated on 18 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc